<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
[#include "/admin/include/head.htm"]

    <script type="text/javascript">


        var grid;
        $(function(){
            grid = $("#maingrid").ligerGrid({
                columns: [
                    {hide: true, name: 'path'},
                    {display: '用户id', name: 'u_id', align: 'center', width: 200 },
                    {display: '用户名', name: 'u_username', align: 'center', width: 100 },
                    {display: '标的id', name: 'id', align: 'center', width: 100 },
                    {display: '借款金额', name: 'account', align: 'center', width: 100 },
                    {display: '标的名称', name: 'name', align: 'center', width: 100 },
                    {display: '还款方式', name: 'pay_style', align: 'center', width: 100,dict:"borrow_style" },
                    {display: '待还金额', name: 'repayment_account', align: 'center', width: 100 },
                    {display: '已还金额', name: 'repayment_yesaccount', align: 'center', width: 100 },
                    {display: '应还时间', name: 'r_stay_time', align: 'center', width: 100 ,isdate:"true"},
                    {display: '当前期', name: 'r_stay_periods', align: 'center', width: 100 },
                    {display: '总期数', name: 'repayment_periods', align: 'center', width: 100 },
                    {display: '本次应还总额', name: 'r_stay_account', align: 'center', width: 100 },
                    {display: '本次应还本金', name: 'r_stay_capital', align: 'center', width: 100 },
                    {display: '本次应还利息', name: 'r_stay_interest', align: 'center', width: 100},
                    {display: '奖励', name: 'radio_account', align: 'center', width: 100 }
                ],  pageSize:20, url: 'queryData.aspx',toolbar: {}, width: '100%', height:'100%', enabledSort: true
            });


            $(".l-toolbar").ligerToolBar({ items: [

                { text: '投标记录', click: f_tenderlog },

                { line:true },
                { text: '导出', click: f_export_loan }
            ]
            });
            //绑定搜索按钮
            LG.search(grid);
        });





        function f_tenderlog(){
            var selecteds = grid.getSelecteds();
            if (selecteds.length != 1) {
                LG.tip('请选择一行记录!');
                return;
            }
            top.f_addTab(null, '投标记录', '${path}/admin/tender/tenderLog'+selecteds[0].id+'.aspx');

        }


        function f_export_loan(){
            $("#exportForm").submit();
        }


    </script>
</head>
<body style="padding:10px; overflow:hidden;">
<div id="functions">
    <div class="clearfix">
        <div style="float:left;">
            <form id="exportForm" method="post" action="${path}/admin/borrow/exportTendersList.aspx">
            <span>
					用户ID：<input type="text" name="userId"  />
			</span>
            <span>
					用户名：<input type="text" name="userName"  />
			</span>
            <span>
					项目ID：<input type="text" name="borrowId"  />
			</span>
			<span>
					项目名：<input type="text" name="borrowName"  />
			</span>
            <span>
					还款状态：  [@u.select list={"":"全部","0":"未还","1":"已还"}
            name="status" value="${(status)!''}" /]
				</span>

            应还日期：<input type="text" id="begin_date" name="begin_date"
                        class="formText WdatePicker {dateFmt:'yyyy-MM-dd'}" />
            -
            <input type="text" id="endDate" name="end_date"
                   class="formText WdatePicker {dateFmt:'yyyy-MM-dd'}" />
            <input type="button" class="button" value="搜索" id="search"/>
            <a href="#" id="search_btn_reset" face="Wingdings 3">清除本次搜索</a>
            </form>
        </div>
    </div>
</div>

<div id="maingrid" style="margin:0; padding:0"></div>
</body>
</html>